<include file="public/header"/>
<div class="am-cf admin-main">
    <!-- sidebar start -->
    <include file="public/sidebar"/>
    <!-- sidebar end -->

    <!-- content start -->
    <div class="admin-content">
        <div class="am-cf am-padding">
            <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">医生列表</strong></div>
        </div>

        <div class="am-g">
            <div class="am-u-md-6 am-cf">
                <div class="am-fl am-cf">
                    <div class="am-btn-toolbar am-fl">
                        <a href="{:U('Front/addDocterPage')}">
                            <button type="button" class="am-btn am-btn-primary am-btn-xs">
                                <span class="am-icon-plus"></span>新增</button>
                        </a>
                    </div>
                </div>
            </div>
            <!--<form method="post" action="__URL__/search" class="am-form">-->
                <!--<div class="am-form-group am-margin-left am-fl">-->
                    <!--<select name="select" id="select">-->
                        <!--<option value="phone">手机</option>-->
                        <!--<option value="yuyue_date">日期</option>-->
                    <!--</select>-->
                <!--</div>-->
                <!--<div class="am-u-md-3 am-cf">-->
                    <!--<div class="am-fr">-->
                        <!--<div class="am-input-group am-input-group-sm">-->
                            <!--<input type="text" class="am-form-field" name="ifin" id="ifin">-->
                            <!--<span class="am-input-group-btn">-->
                  <!--<button class="am-btn am-btn-default" type="submit">搜索</button>-->
                <!--</span>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
            <!--</form>-->
        </div>

        <div class="am-g">
            <div class="am-u-sm-12">
                <table class="am-table am-table-striped am-table-hover table-main">
                    <thead>
                    <tr>
                        <th class="table-check"><input type="checkbox"/></th>
                        <th class="table-title">姓名</th>
                        <th class="table-title">城市</th>
                        <th class="table-title">头衔</th>
                        <th class="table-title">职务</th>
                        <th class="table-type">医院</th>
                        <th class="table-author">科室</th>
                        <th class="table-date">描述</th>
                        <th class="table-title">图片</th>
                        <th class="table-date">分类</th>
                        <th class="table-set">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <foreach name="datas" item="data">
                        <tr>
                            <td><input type="checkbox"/></td>
                            <td>{$data.name}</td>
                            <td>{$data.city}</td>
                            <td>{$data.a_title}</td>
                            <td>{$data.m_title}</td>
                            <td>{$data.hospital}</td>
                            <td>{$data.dept_name}</td>
                            <td>{$data.desc}</td>
                            <if condition="$data.sta eq 1">
                                <td><img src="{$data.img}" style="width: 50px;"></td>
                                <else/>
                                <td><img src="__PUBLIC__/img/wp/{$data.img}" style="width: 50px;"></td>
                            </if>

                            <td>{$data.dept_id}</td>
                            <td>
                                <div class="am-btn-toolbar">
                                    <div class="am-btn-group am-btn-group-xs">
                                            <a href="__URL__/editDoctorPage/id/{$data.id}">
                                                <button class="am-btn am-btn-default am-btn-xs am-text-success">
                                                    <span class="am-icon-pencil-square-o"></span>修改
                                                </button>
                                            </a>
                                            <a href="__URL__/delDoctor/id/{$data.id}" onclick="javascript:return del()">
                                                <button class="am-btn am-btn-default am-btn-xs am-text-danger">
                                                    <span class="am-icon-trash-o"></span>删除
                                                </button>
                                            </a>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </foreach>
                    </tbody>
                </table>
                <div class="am-cf">
                    {$page}
                </div>
                <hr/>
                </form>
            </div>
        </div>
    </div>
    <!-- content end -->
</div>
<script>
    function del(){
        var msg = "确认删除么？";
        if(confirm(msg)==true){
            return true;
        }else{
            return false;
        }
    }
</script>
<include file="public/footer"/>

